var express = require('express')

var app = express()

//当以/public/开头，可以访问./public/路径下的内容
app.use('/public/', express.static('./public/'))

//省略第一个参数，访问不加./public/
app.use(express.static('./public/'))

app.get('/', function (req, res) {
    // res.end('hello world')

    res.send('hello world')
})

app.listen('3000', function () {
    console.log('express app is running')
})

